<html>
  <head></head>
  <body>
    <div id="app">
      <div>Computed</div>
    </div>
  </body>
  <script src="../vue002-proxy/proxy.js"></script>
  <script src="../vue003-Ref/ref.js"></script>
  <script src="./computed.js"></script>
  <script>
    let product = reactive({ price: 5, quantity: 2 })

    let salePrice = computed(() => {
      return product.price * 0.9
    })
    let total = computed(() => {
      return salePrice.value * product.quantity
    })

    console.log(salePrice.value)
    console.log(total.value)

    product.price = 10

    console.log(salePrice.value)
    console.log(total.value)
  </script>
</html>
